package com.tangyuan.live.entity.enums;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum LiveRoomStatusEnum {

    //HAVE_NOT_STARTED(0,"未开始"),
    UNDERWAY(1,"直播中"),
    FINISHED(2,"已结束"),
    ;

    public final Integer status;
    public final String statusStr;

    public static LiveRoomStatusEnum getEnum(Integer status){
        for (LiveRoomStatusEnum value : LiveRoomStatusEnum.values()) {
            if(value.status.equals(status)){
                return value;
            }
        }
        return FINISHED;
    }
}
